\hypertarget{structmiddleware_1_1PeersKnowledge}{
\section{middleware::PeersKnowledge Struct Reference}
\label{structmiddleware_1_1PeersKnowledge}\index{middleware::PeersKnowledge@{middleware::PeersKnowledge}}
}


Represents a global reference to a PeersSet within its guard mutex.  




{\ttfamily \#include $<$common\_\-types.hpp$>$}

\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{structmiddleware_1_1PeersKnowledge_a9ce4655fe65d926ae323d4c3d1f083be}{
\hyperlink{namespacemiddleware_a260b140db0d63fd94d8e480691e9ecb9}{PeersSet} $\ast$ {\bfseries ptr\_\-to\_\-worker\_\-descriptors}}
\label{structmiddleware_1_1PeersKnowledge_a9ce4655fe65d926ae323d4c3d1f083be}

\item 
\hypertarget{structmiddleware_1_1PeersKnowledge_a9fe65769e8529da5c31afc42e8536e6b}{
boost::mutex $\ast$ {\bfseries ptr\_\-to\_\-worker\_\-descriptors\_\-mutex}}
\label{structmiddleware_1_1PeersKnowledge_a9fe65769e8529da5c31afc42e8536e6b}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Represents a global reference to a PeersSet within its guard mutex. \hyperlink{structmiddleware_1_1PeersKnowledge}{PeersKnowledge} \hyperlink{classmiddleware_1_1Worker}{Worker} and \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery} have to look at a common table of \hyperlink{classmiddleware_1_1WorkerDescriptor}{WorkerDescriptor} in order to, respectively, get the current best worker for a task and notify a change of status (worker sending its new status to all neighbours' \hyperlink{classmiddleware_1_1WorkerDiscovery}{WorkerDiscovery}). This table is a PeersSet. This structure represents a consistent pointer to the set of known peers, given that many threads will query the collection and will also edit it, it is necessary to consider a protection mechanism to guarantee data consistency, for this reason mutex to the collection is considered too. The structure holds pointers to collection and its mutex because the reside somewhere in the application. 

The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
\item 
common\_\-types.hpp\end{DoxyCompactItemize}
